<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="com.wed.db.ConnectDB"%>
<%@page import="com.wed.db.cmapstudent"%>
<%@page import="java.util.ArrayList"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome</title>
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />

<!--[if lte IE 6]>
	<script type="text/javascript" src="supersleight-min.js"></script>
    <link href="css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/dataTables.colReorder.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/dataTables.colVis.css">

<style type="text/css" class="init">
</style>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/dataTables.colReorder.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/dataTables.colVis.js"></script>


<script type="text/javascript" language="javascript" class="init">


$(document).ready(function() {
    var table = $('#example').DataTable( {
        dom: 'RC<"clear">lfrtip',
        columnDefs: [
            { visible: false, targets: 1 }
        ]
	} );
} );


	</script>
</head>

<body>
<%String t= request.getParameter("username");
ArrayList<cmapstudent> lst = new ConnectDB().getListCmapStudentSM(t);
String sh = "ReceiveCmStudent.jsp?username="+t;
String btChuaLam = "BTChuaLamSV.jsp?username="+t;
			String view = "BTDaLam_SV.jsp?username="+t;%>
<div id="main"><!-- Main starts here -->
<div id="header"><!-- Header starts here -->
	<img src="images/spkt.png" alt="" width="100%" height="250px"/>
</div><!-- Header ends here -->
<div id="navigation">
<ul>
	<li><a href="#" title=""><font color="black" size="1">Xin Chào Sinh Viên:</font></a></li>
	<li><a href="#" title=""><%=t%></a></li>
</ul>
</div>
<div id="contentHolder"><!-- Content Holder starts here -->
<div id="content"><!-- Content starts here -->
<div id="back">


<div class="clear"></div>

<div id="leftpart">
	<div class="container">
    <h1>Menu</h1>
    <ul>
    	<li><a href="<%=btChuaLam%>">Xem Bài Tập Được Giao</a></li>
       
        <li><a href="<%=view%>">Xem Bài Tập Đã Làm</a></li>
        <li><a href="<%=sh%>">Bài Tập Được Share</a></li>
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>
        
        <li><a href="#"></a></li>
        
    </ul>
    <div class="button"><input type="button" onclick="location.href='DangNhap.jsp'"  value="thoat" class="learnmore" /></div>
    </div>
</div>

<div id="middlepart">
	<h1>Danh Sách Bài Tập</h1>
			<table id="example" class="display" cellspacing="0" width="100%">

				<thead>
					<tr background="#800517">

						<td width="10%" height="26" bgcolor="#CC6600">CmapVersion</td>
						<td width="10%" bgcolor="#CC6600">SubmitDay</td>
						<td width="5%" bgcolor="#CC6600">Score</td>
						<td width="10%" bgcolor="#CC6600">UserName Student</td>
						<td width="10%" bgcolor="#CC6600">Id Assignment</td>
						<td width="10%" bgcolor="#CC6600"></td>

						<td width="10%" bgcolor="#CC6600"></td>
						<td width="10%" bgcolor="#CC6600"></td>
					</tr>
				</thead>
				<tbody>
					<%
				 for(cmapstudent cm : lst){
					 String detailURL = "CTBTDaLam_SV.jsp?cmapversion="+cm.getCmapversion();
				  String share = "ShareStudent.jsp?username="+cm.getUsernamestudent()+"&cmapversion="+cm.getCmapversion();
				 String xemfeedback = "KetquaSubmit.jsp?idVersion="+cm.getCmapversion()+"&AssignmentId="+cm.getIdAss()+"&username="+cm.getUsernamestudent();
				%>
					<tr>

						<td><%=cm.getCmapversion() %></td>
						<td><%=cm.getDatesubmit() %></td>
						<td><%=cm.getScore() %></td>
						<td><%=cm.getUsernamestudent() %></td>
						<td><%=cm.getIdAss() %></td>
						
						<td><a href="<%=xemfeedback%>">Xem feedback </a></td>
						

						<td><a href="<%=detailURL%>">Detail </a></td>
						<td><a href="<%=share%>">Share </a></td>

					</tr>
					<%} %>

				</tbody>
			</table>
</div>


<div class="clear"></div>
<!--<div class="bottomImg"><img src="images/bottomBg.png" alt="" /></div>-->
</div>
</div><!-- Content ends here -->
</div><!-- Content Holder ends here -->
<div class="bottomImg"><img src="images/02.png" alt="" /></div>



<div id="footer"><!-- Footer starts here -->
<div lang="copy">Nhóm 5 Lớp 11110CLC</div>
<div class="design"><a href="#">Designed by Ngân-Trường-Hùng</a></div>
<div class="clear"></div>
</div><!-- Footer ends here -->
</div><!-- Main ends here -->
</body>
</html>
